package com.xjscrm.common.enums;

/**
 * 新客户不通过类型枚举
 * @Auther: liuqi
 * @Date: 2021/8/19 11:22
 * @Description:
 */
public enum FriendReqNotPassTypeEnum {

    VALID(0,"未知原因"),
    SCENE(1,"来源不匹配"),
    DAYMAX(2,"达到日限"),
    GENDER (3,"性别拦截"),
    SLEEP(4,"休眠时间"),
    NICKNAME(5,"昵称不匹配"),
    VERIFYMSG(6,"验证消息不匹配"),
    ENTERPRISE(7,"企业不匹配"),
    BLACKLIST(8,"黑名单"),

    ;

    private Integer id;
    private String desc;

    FriendReqNotPassTypeEnum(Integer id, String desc) {
        this.id = id;
        this.desc = desc;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static FriendReqNotPassTypeEnum getById(Integer id) {
        if (id == null) {
            return null;
        }
        for (FriendReqNotPassTypeEnum type: FriendReqNotPassTypeEnum.values()) {
            if (type.getId().intValue() == id.intValue()) {
                return type;
            }
        }
        return null;
    }
}
